<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dynamic Weather Updates</title>
</head>
<body>
<h1>Weather:</h1>
<p id="weather">Loading...</p>

<script type="text/javascript">
if(typeof(EventSource)!=="undefined") {
	var source = new EventSource("/weather");
	source.onmessage = function(event) {
		document.getElementById("weather").innerHTML = event.data;
	};
} else {
	document.getElementById("weather").innerHTML = "Your browser does not support server-sent events.";
}
</script>
</body>
</html>